<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form" %>
<html>
<body>

<div class="panel panel-default">
  <!-- Default panel contents -->
  <div class="panel-heading">${titulo}</div>
  <div class="panel-body">
  
   	<c:url var="actionUrl" value="/tarefa/salvar"/>
	<form action="${actionUrl}" method="post">
		<table border="0">
			<tr>
				<td>Titulo</td>
				<td>
					<input type="text" name="tituloConteudo" value="${tarefa.tituloConteudo}"/>
					<form:errors path="tarefa.tituloConteudo" cssStyle="color:red"/>
				</td>
			</tr>
			<tr>
				<td>Assunto</td>
				<td>
					<input type="text" name="assuntoConteudo" value="${tarefa.assuntoConteudo}"/>
					<form:errors path="tarefa.assuntoConteudo" cssStyle="color:red"/>
				</td>
			</tr>
			<tr>
				<td>Tag</td>
				<td>
					<input type="text" name="nomeTag" value="${tag.nomeTag}"/>
					<form:errors path="tag.nomeTag" cssStyle="color:red"/>
				</td>
			</tr>
			<tr>
				<td>Data Limite</td>
				<td>
					<input type="text" name="dataLimite" value="${tarefa.dataLimite}"/>
					<form:errors path="tarefa.dataLimite" cssStyle="color:red"/>
				</td>
			</tr>
			<tr>
				<td>Rotina</td>	
				<td>
					<c:choose>
 					<c:when test="${tarefa.rotina == true}">
 						<form:checkbox name="checkrotina" path="tarefa.rotina" value="${tarefa.rotina}"/>
						<form:errors path="tarefa.rotina" cssClass="error" />
 					</c:when>  
					<c:otherwise>
						<form:checkbox name="checkrotina" path="tarefa.rotina" />
						<form:errors path="tarefa.rotina" cssClass="error" />
				 	</c:otherwise>
					</c:choose>
				</td>
			</tr>
		</table>
		<input type="hidden" name="idConteudo" value="${tarefa.idConteudo}" />
		<input type="hidden" name="idTag" value="${tag.idTag}" />
		<input type="submit" value="Salvar">
	</form>
   	
   	
</div></div>
	
	
	
	
</body>
</html>